package com.example;

import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;

public class MyClass {

    public static void main(String[] args){
        Schema schema = new Schema(1000, "com.example.zbh.dsliao.db.entity");
        addNote(schema);
        try {
            new DaoGenerator().generateAll(schema, "./app/src/main/java");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void addNote(Schema schema){
        Entity entity = schema.addEntity("User");
        entity.addIdProperty().autoincrement().primaryKey();
        entity.addStringProperty("userName");


        Entity entityFriend = schema.addEntity("ApplyFriend");
        entityFriend.addIdProperty().autoincrement().primaryKey();
        entityFriend.addStringProperty("name");
        entityFriend.addIntProperty("index");


        Entity entityCarrousel = schema.addEntity("CarrouselPic");
        entityCarrousel.addIdProperty().autoincrement().primaryKey();
        entityCarrousel.addStringProperty("randpic").columnName("randpic");


        Entity entityForYouRecommend = schema.addEntity("ForYouRecommend");
        entityForYouRecommend.addIdProperty().autoincrement().primaryKey();
        entityForYouRecommend.addStringProperty("pic_big").columnName("pic_big");



        Entity entityHotSongMenu = schema.addEntity("HotSongMenu");
        entityHotSongMenu.addLongProperty("_id").columnName("_id").primaryKey();
        entityHotSongMenu.addStringProperty("title").columnName("title");
        entityHotSongMenu.addStringProperty("pic_url").columnName("pic_url");


        Entity entitySongRecommend = schema.addEntity("SongRecommend");
        entitySongRecommend.addIdProperty().autoincrement().primaryKey();
        entitySongRecommend.addStringProperty("title").columnName("title");
        entitySongRecommend.addStringProperty("recommend_reason").columnName("recommend_reason");
        entitySongRecommend.addStringProperty("pic_big").columnName("pic_big");
        entitySongRecommend.addStringProperty("author").columnName("author");


        Entity entityNewSong = schema.addEntity("NewSong");
        entityNewSong.addIdProperty().autoincrement().primaryKey();
        entityNewSong.addStringProperty("title").columnName("title");
        entityNewSong.addStringProperty("author").columnName("author");
        entityNewSong.addStringProperty("pic_big").columnName("pic_big");


        Entity entityRadioSet = schema.addEntity("RadioSet");
        entityRadioSet.addIdProperty().autoincrement().primaryKey();
        entityRadioSet.addStringProperty("desc").columnName("desc");
        entityRadioSet.addStringProperty("title").columnName("title");
        entityRadioSet.addStringProperty("pic").columnName("pic");



        Entity entityNewSongImg = schema.addEntity("NewSongImg");
        entityNewSongImg.addIdProperty().autoincrement().primaryKey();
        entityNewSongImg.addStringProperty("title").columnName("title");
        entityNewSongImg.addStringProperty("pic").columnName("pic");
        entityNewSongImg.addStringProperty("message").columnName("message");


        Entity entityUserContact = schema.addEntity("UserContact");
        entityUserContact.addIdProperty().autoincrement().primaryKey();
        entityUserContact.addStringProperty("username");
        entityUserContact.addStringProperty("nickname");
        entityUserContact.addStringProperty("avatar");

        Entity entityImageVP = schema.addEntity("ImageViewpager");
        entityImageVP.addIdProperty().autoincrement().primaryKey();
        entityImageVP.addStringProperty("username").columnName("username");
        entityImageVP.addStringProperty("imageUrl").columnName("imageUrl");
    }

}
